*** Paper: 			Does The World Trade Organization Enable Biosecurity and Trade for Importers and Exporters?
*** Authors: Linda Fernandez and Monica Das
*** Date:    		November 9, 2023
*** Last updated:   February 21, 2024
*** Description:	STATA codes for Tables 3 in the paper

*******************************************************
********** Table 3                                 ****
********* Baseline and MIS (Corrected for          **** endogeneity)                                       ****
*******************************************************
///Download STATA file "wd.dta" from the Harvard Dataverse  
///Change directory to appropriate folder
//import STATA dataset "wd.dta" 
use "wd.dta", clear


asdoc, text(Effect of 3 types of Technical Assistance on Agricultural Exports), save(table 3) fs(16) font(Times New Roman) replace

tabulate ccode, gen(cty_dum)

asdoc regress AgrExport TACommlag Manu_sh lnRGDP cty_dum1 - cty_dum33, drop(cty_dum1-cty_dum33) save(table 3) replace nest fs(8) dec(2) cnames(AgrExportit) font(Times New Roman) abb(.) 

asdoc regress AgrExport TAduration Manu_sh lnRGDP cty_dum1 - cty_dum33, drop(cty_dum1-cty_dum33) save(table 3) nest append fs(8) dec(2) cnames(AgrExportit) font(Times New Roman) abb(.) 

asdoc regress AgrExport lnTAvalue Manu_sh lnRGDP cty_dum1 - cty_dum33, drop(cty_dum1-cty_dum33) save(table 3) nest fs(8) dec(2) cnames(AgrExportit) font(Times New Roman) abb(.)

asdoc regress AgrExport TACommlag Manu_sh lnRGDP Diversification_Int resid_Div cty_dum1 - cty_dum33, drop(cty_dum1-cty_dum33) vce(bootstrap, reps(1000) seed(101016) dots(100)) save(table 3) nest append fs(8) dec(2) cnames(Corrected) font(Times New Roman) abb(.) 

asdoc regress AgrExport TAduration Manu_sh lnRGDP Duration_Int resid_Dur cty_dum1 - cty_dum33, drop(cty_dum1-cty_dum33) vce(bootstrap, reps(1000) seed(101016) dots(100)) save(table 3) nest append fs(8) dec(2) cnames(Corrected) font(Times New Roman) abb(.) 

asdoc regress AgrExport lnTAvalue Manu_sh lnRGDP Value_Int resid_Value cty_dum1 - cty_dum33, drop(cty_dum1-cty_dum33) vce(bootstrap, reps(1000) seed(101016) dots(100)) save(table 3) nest fs(8) dec(2) cnames(Corrected) font(Times New Roman) abb(.) 

